package com.lesson4.abstractfactory.pizzastore.order;

import com.lesson4.abstractfactory.pizzastore.pizza.BJCheesePizza;
import com.lesson4.abstractfactory.pizzastore.pizza.BJHuJiaoPizza;
import com.lesson4.abstractfactory.pizzastore.pizza.Pizza;

/**
 * @author 朝花不迟暮
 * @version 1.0
 * @date 2020/8/27 18:24
 */
public class BJFactory implements ABSFactory
{
    @Override
    public Pizza createPizza(String orderType)
    {
        Pizza pizza = null;
        if(orderType.equals("Cheese")){
            pizza = new BJCheesePizza();
        }else if(orderType.equals("Hujiao")){
            pizza = new BJHuJiaoPizza();
        }
        return pizza;
    }
}
